/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gap.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Yunita
 */
@Entity
@Table(name = "gap_master_employee_position")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "GapMasterEmployeePosition.findAll", query = "SELECT g FROM GapMasterEmployeePosition g"),
//    @NamedQuery(name = "GapMasterEmployeePosition.findBySync", query = "SELECT g FROM GapMasterEmployeePosition g WHERE g.sync = :sync"),
//    @NamedQuery(name = "GapMasterEmployeePosition.findByEmployeePositionId", query = "SELECT g FROM GapMasterEmployeePosition g WHERE g.employeePositionId = :employeePositionId"),
//    @NamedQuery(name = "GapMasterEmployeePosition.findByEmployeePositionName", query = "SELECT g FROM GapMasterEmployeePosition g WHERE g.employeePositionName = :employeePositionName")})
public class GapMasterEmployeePosition implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "employee_position_id")
    private Integer employeePositionId;
    @Column(name = "employee_position_name")
    private String employeePositionName;
    @Lob
    @Column(name = "employee_position_description")
    private String employeePositionDescription;
   
    public GapMasterEmployeePosition() {
    }

    public GapMasterEmployeePosition(Integer employeePositionId) {
        this.employeePositionId = employeePositionId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getEmployeePositionId() {
        return employeePositionId;
    }

    public void setEmployeePositionId(Integer employeePositionId) {
        this.employeePositionId = employeePositionId;
    }

    public String getEmployeePositionName() {
        return employeePositionName;
    }

    public void setEmployeePositionName(String employeePositionName) {
        this.employeePositionName = employeePositionName;
    }

    public String getEmployeePositionDescription() {
        return employeePositionDescription;
    }

    public void setEmployeePositionDescription(String employeePositionDescription) {
        this.employeePositionDescription = employeePositionDescription;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (employeePositionId != null ? employeePositionId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GapMasterEmployeePosition)) {
            return false;
        }
        GapMasterEmployeePosition other = (GapMasterEmployeePosition) object;
        if ((this.employeePositionId == null && other.employeePositionId != null) || (this.employeePositionId != null && !this.employeePositionId.equals(other.employeePositionId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return employeePositionName;
//        return "com.gap.entities.GapMasterEmployeePosition[ employeePositionId=" + employeePositionId + " ]";
    }
    
}
